import { Controller } from "../../mvc/core/Controller";
import { Dispatcher } from "../../mvc/core/Dispatcher";
import { EventName } from "../mvc/EventName";
import { DataEvent } from "../events/DataEvent";
import { GameProxy } from "../mvc/GameProxy";
//class RoleController
    
    export  class RoleController extends Controller
    {
       

        protected /* override */ initServer(): void
        {
            Dispatcher.addEventListener(EventName.SunBath, this.onSunBathHandler);
            return;
        }

        public onSunBathHandler(arg1: DataEvent): void
        {
            if (arg1.data != true) 
            {
                GameProxy.roleProxy.endSunBath();
            }
            else 
            {
                GameProxy.roleProxy.startSunBath();
            }
            return;
        }
    }
